import request from '@/utils/request'

// -------------------------------------------------------------------------------------入库管理接口文档----------------------------------------------------------------------------

// 获取入库管理列表---------------------------------------- 
export function list (params) {
  return request({
    url: '/function/warehousing/list',
    method: 'get',
    params
  })
}

// 入库管理列表删除接口---------------------------------------
export function deletelist (id) {
  return request({
    url: '/function/warehousing/' + id,
    method: 'delete',
  })
}

// 入库管理列表确定入库接口---------------------------------------
export function resubmitPut (id) {
  return request({
    url: '/function/warehousing/confirm/' + id,
    method: 'put',
  })
}

// 获取入库单列表详情 ==> 两个页面,以及编辑全部通用 ----------------------------------------
export function listDetail (id) {
  return request({
    url: '/function/warehousing/' + id,
    method: 'get',
  })
}

//开入库单：获取采购单列表----------------------------------------
export function equipmentList (params) {
  return request({
    url: '/function/purchase/partInfo/list',
    method: 'get',
    params
  })
}

//开入库单：获取入库仓库列表----------------------------------------
export function replacementList (params) {
  return request({
    url: '/function/storehouse/list',
    method: 'get',
    params
  })
}

//开入库单==>添加物料【按钮】==>：获取耗材列表----------------------------------------
export function getuserlist (params) {
  return request({
    url: '/function/consumable/base/priceAndAmount/list',
    method: 'get',
    params
  })
}
//开入库单: 提交接口----------------------------------------
export function add (data) {
  return request({
    url: '/function/warehousing',
    method: 'post',
    data
  })
}

// 开入库单:获取仓库列表，用于反向获取父级id---------------------------------------- 
export function RegionalList (params) {
  return request({
    url: '/function/storehouse/treeselect',
    method: 'get',
    params
  })
}

// 开入库单: 修改接口---------------------------------------- 
export function warehousingPut (data) {
  return request({
    url: '/function/warehousing',
    method: 'put',
    data
  })
}
// ------------------------------------------------------------------------------------- 入库记录接口文档----------------------------------------------------------------------------

// 获取入库记录列表----------------------------------------
export function listAndMe (params) {
  return request({
    url: '/function/warehousing/consumable/list',
    method: 'get',
    params
  })
}
